<?php
/**
* 	Bushido
 *
 * @category   Bushido
 * @package    Bushido_FusionCharts
 * @subpackage Theme
 * @copyright  Copyright (c) 2008-2009 Nathan Keyes
 * @author Nathan Keyes
 * @version    $Id: ScatterPlot.php 7 2009-11-14 22:42:08Z nkeyes $
 */

/**
 * 
 * @author Nathan Keyes
 *
 */
class Bushido_FusionCharts_Theme_ScatterPlot extends Bushido_FusionCharts_Theme_MultiSeries
{
	protected $_dateLabelFormat;
	protected $_dbh;
	
	
	/**
	 * 
	 * @param $dateLabelFormat
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();
		$this->name = 'ScatterPlot';
		$this->chartType = Bushido_FusionCharts::SCATTER;
	}
	
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/FusionCharts/Theme/Bushido_FusionCharts_Theme_MultiSeries#getDataSetNode()
	 */
	public function getDataSetNode($name)
	{
		return "<dataset SeriesName='$name' drawLine='0' drawAnchors='1' />";	
	}
	
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/FusionCharts/Theme/Bushido_FusionCharts_Theme_MultiSeries#getDataNode()
	 */
	public function getDataNode($x, $y)
	{
		
		$setNode =  "<set toolText='$x, $y' x='$x' y='$y'/>";
		return $setNode;
	}
	
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/FusionCharts/Theme/Bushido_FusionCharts_Theme_MultiSeries#getCategoryNode()
	 */
	public function getCategoryNode($x)
	{
		$categoryNode =  "<category x='" . $this->getCategoryLabel($x) . "' label='" . $this->getCategoryLabel($x) . "' />";
		return $categoryNode;
	}
	
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/FusionCharts/Theme/Bushido_FusionCharts_Theme_MultiSeries#getCategoryLabel()
	 */
	public function getCategoryLabel($x)
	{
		return ((int) ($x / 10)) * 10;
	}
	
}
